<template>
  <div >
    <h1>我是box子组件</h1>
    <h1>{{myname}}</h1>
  </div>
</template>
<script setup>
import {ref,onActivated,onDeactivated} from 'vue'

 import {useDebouncedRef} from './myRef'
  let myname=ref("杨二郎",3000);

    onActivated(()=>{
      console.log("组件激活")
    })
    onDeactivated(()=>{
        console.log("组件失活")
    })
  myname.value="孙悟空"
</script>